Objects Reference

class console

Definition

class console
{
public:

    int mode,time,nlines,linecount,winlines;
    char *buf[CONSOLE_MAX_LINES];

    char cmd_line[256];
    int cmd_pos;

    float dx,dy;

    console();
    ~console();

    void show();
    void hide();
    void draw();
    void step(int dt);
    float draw_text(float x,float y,char *text);

    void key_press(int key);
    void add_string(char *fmt, ...);
    int command_tokens(char *str,char **token);
    void command_exec(char *str);
};

Data Members

Member Type Description
mode int console flags: (1 closing, 0 closed, 1 opening)
time int current animation time
nlines int number of lines in buf
linecount int current line number
winlines int number of lines currently visible
buf char [] the console string history
cmdline char [] the current command line
cmd_pos int the current command line cursor position
dx float cursor size in x  
dy float cursor size in y

Methods

show, hide, draw, step, draw_text, key_press, add_string, command_tokens, command_exec

Remarks

This class implements the graphical game console. It enables you to type commands and execute them. Commands can create and delete game objects, change game object parameters, change current map and even save the current level state.

See Also

flyEngine